<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>U享书城</title>
    <meta charset="UTF-8">
    <link rel="shortcut icon" href="/static/bg_img/favicon.ico">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <script src="static/1/js/bootstrap.min.js"></script>
    <link href="static/1/css/bootstrap.min.css" rel="stylesheet">
    <link href="static/1/css/swiper.min.css" rel="stylesheet">
    <script src="static/1/js/jquery-3.4.1.min.js"></script>
    <script src="static/1/js/swiper-bundle.min.js"></script>
    <script src="static/1/js/bootstrap.min.js"></script>
    <link href="{{ url_for('static',filename='layui/css/layui.css') }}" rel="stylesheet"/>
    {#    <script type="text/javascript" src="{{ url_for('static',filename='jquery/jquery-3.5.1.min.js') }}"></script>#}
    <script src="{{ url_for('static',filename='layui/layui.js') }}"></script>


    <style>

        #firstbody {
        {#background: white url("https://cdn.acwing.com/static/web/img/background.png") fixed;#} background-size: auto;
        }

        @media (min-width: 1000px) and (max-width: 2000px) {
            .collapse {
                display: none !important;
            }
        }
    </style>


    <br><br><br><br>
</head>
<body id="firstbody" style="min-height: 100vh;">

<div id="first_page">
    <nav class="navbar navbar-inverse navbar-fixed-top navbar-expand-lg" style="z-index: 10;margin-top: 5px">
        <div class="container">
            <!-- Header -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#topNavBar">
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/">U享书城</a>
            </div>
            <!-- Items -->
            <div class="collapse navbar-collapse" id="topNavBar">
                <ul class="nav navbar-nav">
                    <li class="layui-nav-item layui-this"><a href="/">首页</a></li>
                    <li class="layui-nav-item"><a href="/shuku" target="mainFrame">书库</a></li>
                    <li class="layui-nav-item"><a href="/usercenter">用户中心</a></li>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    {% if username ==None %}
                        <li>
                            <a id="login-modal" href="/loginANDregister">登录/注册</a></li>
                    {% else %}
                        <li>
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                &nbsp;&nbsp;<strong id="id_user_username">{{ username }}</strong>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li>
                                    <a href="javascript:signout()">登出</a>
                                </li>
                            </ul>
                        </li>
                    {% endif %}
                </ul>
                <form class="navbar-form navbar-right" action="/" id="cse-search-box">
                    <a class="btn btn-info" href="/buylist" target="mainFrame">
                        <span class="glyphicon glyphicon-shopping-cart"></span>
                        购物车<span class="badge">0</span>
                    </a>
                    <div class="input-group">
                        <input placeholder="Search" class="form-control input-sm">
                        <a class="input-group-addon btn btn-danger">
                            <span class="glyphicon glyphicon-search"></span>
                        </a>
                    </div>
                </form>
            </div>
        </div>
    </nav>


</div>
<div class="base_body" style="width: 1200px;margin: 0 auto">
    <iframe name="mainFrame" src="/main" width="100%" height="1200px" frameborder="0">
    </iframe>
</div>

<script>
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;

        function exit() {
            layer.alert("是否退出系统?", {
                closeBtn: 1,
                anim: 2,
                icon: 1,
                btn: ["确定", "取消"],
                yes: function () {
                    sessionStorage.clear()
                    window.location.href = "/"
                },
                btn2: function () {
                }
            })
        }
    })

</script>
<script type="text/javascript">

    function signout() {
        layer.alert("是否退出系统?", {
            closeBtn: 1,
            anim: 1,
            icon: 1,
            btn: ["确定", "取消"],
            yes: function () {
                sessionStorage.clear()
                window.location.href = "/"
            },
            btn2: function () {

            }
        })

    }
</script>
</body>
<center>
    <footer class="text-center">
    <p>Copyright &#169; 2021-2022 飞鹰团队, Lales.</p>
    </footer>
</center>

</html>